package com.hung.triple.bootstrap.annotation;

import java.lang.annotation.*;

/**
 * 声明为 RPC 服务消费者
 *
 * @author Hung
 * @since 2022/9/18
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE})
public @interface TripleConsumer {


    /**
     * Service version, default value is empty string
     */
    String version() default "";

    /**
     * Service group, default value is empty string
     */
    String group() default "";

    /**
     * Timeout value for service invocation, default value is 0
     */
    int timeout() default 0;

    /**
     * Whether to enable async invocation, default value is false
     */
    boolean async() default false;

    /**
     * flow control grade, can choose seconds minutes
     */
    String flowGrade() default "";


    /**
     * flow control count, it decides when to cut down the request
     */
    String flowCount() default "";

    /**
     * loadBalancer choice , it can choose RandomBalancer or HashBasedBalancer
     */
    String loadBalance() default "";
}
